﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain.CarKpi;
using S4Store.Domain.SellerKpi;
using S4Store.Domain.NetMarketingKpi;

namespace S4Store.Models.NetMarketing
{
    public class MediaListModel
    {
        public MediaListModel()
        {
            MediaMonthConfigs = new List<NetMarketingKpiMediaMonthConfig>();
            Medias = new List<NetMarketingMedia>();
        }

        public List<NetMarketingMedia> Medias { get; set; }
        public List<NetMarketingKpiMediaMonthConfig> MediaMonthConfigs { get; set; }

        public NetMarketingKpiMediaMonthConfig GetMediaMonthConfig(int mediaid)
        {
            var result = MediaMonthConfigs.FirstOrDefault(t => t.MediaId == mediaid);
            if (result == null)
            {
                result = new NetMarketingKpiMediaMonthConfig();
            }
            return result;
        }
    }
}